<template>
  <div class="router-content">
    <inside v-for="(div, index) in article" :key="index" :title="div.title" :contents="div.contents" :urls="div.urls"></inside>
  </div>
</template>

<script>
import Bus from '@/assets/bus'
import inside from '@/components/inside'
export default {
  name: 'index',
  components: {
    inside
  },
  data () {
    return {
      menus: [],
      article: []
    }
  },
  created () {
    this.menus = this.$route.matched
    Bus.$emit('menus', this.menus)
    // console.log(this.$route.matched)
    this.write()
  },
  methods: {
    write () {
      this.article = [
        {
          title: '添加厨师',
          contents: [
            '进入基础设置，选择厨师，点击右上角“添加厨师”如下图所示，',
            '弹出厨师信息对话框，如下图所示，填写厨师信息（姓名，专业、等级、备注），点击提交，即添加厨师成功。'
          ],
          urls: [
            '/static/imgs/base/chef_1.png',
            '/static/imgs/base/chef_2.png'
          ]
        }, {
          title: '修改厨师信息',
          contents: [
            '点击已有厨师右边的“修改”如下图所示',
            '弹出厨师信息对话框，如下图所示，修改厨师信息，点击提交，即修改厨师信息成功。'
          ],
          urls: [
            '/static/imgs/base/chef_3.png',
            '/static/imgs/base/chef_4.png'
          ]
        }, {
          title: '删除厨师',
          contents: [
            '点击已有厨师右边的“删除”按钮。如下图所示，',
            '弹出删除对话框，如下图所示，点击确定，即可删除厨师。'
          ],
          urls: [
            '/static/imgs/base/chef_5.png',
            '/static/imgs/base/chef_6.png'
          ]
        }, {
          title: '搜索厨师',
          contents: [
            '输入想要搜索的厨师名称在搜索框内，点击查询，即可出现该厨师。'
          ],
          urls: [
            '/static/imgs/base/chef_7.png'
          ]
        }
      ]
    }
  }
}
</script>
<style>
</style>
